home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 090 / cmln1285.arc / QUIKBAS1.LTG < prev    next >
Text File  |  1986-02-27  |  256b  |  11 lines

  1. quickbasic.rvw LISTING 2
  2.  
  3. DEF FNSUMOFSQUARES(N)
  4.    IF N<=0 THEN FNSUMOFSQUARES = -1:EXIT DEF
  5.    SUM = 0
  6.       FOR I = 1 TO N
  7.       SUM = SUM + I * I
  8.       NEXT I
  9.    FNSUMOFSQUARES = SUM
  10. END DEF
  11.